package dbConn

import (
	"fmt"
	"github.com/jinzhu/gorm"
	_ "github.com/jinzhu/gorm/dialects/mysql"
)

func ConnMysql() *gorm.DB {
	d, err := gorm.Open("mysql", "root:KKbiewangle420!@(39.107.235.61:3306)/p2p?charset=utf8mb4&parseTime=True&loc=Local")
	if err != nil {
		panic(err)
	}
	fmt.Println("连接到数据库")
	return d
}
